define(function(require, exports, module){
  function EventProxy() {
    this.events = {};
  }

  EventProxy.create = function(){
    return new EventProxy();
  };

  EventProxy.prototype = {
    on: function(event, callback){
      if (typeof this.events[event] == "undefined") {
        this.events[event] = $.Callbacks();
      }
      this.events[event].add(callback);
      return this;
    },
    emit: function(event){
      var args = [].slice.call(arguments, 1);
      if (typeof this.events[event] != "undefined") {
        this.events[event].fireWith(this, args);
      }
    },
    off: function(event, callback){
      if (typeof this.events[event] != "undefined") {
        typeof callback != "undefined" ? this.events[event].remove(callback) : this.events[event].remove() ;
      }
    }
  };

  return EventProxy;
});